import { RootState } from "../utils/store.type";
import { Module } from "vuex";

const mediaStatus: Module<any, RootState> = {
	namespaced: true,
	state: () => ({
		currentOperate: -1,
		mediaSize: -1,
		mediaState: "UNKNOWN",
		totalSize: -1,
		currentSize: -1,
	}),

	mutations: {
		statusUpdate(state, payload) {
			// console.log(state,payload);
			const json = JSON.parse(payload);
			Object.assign(state, json);
		},
	},

};

export 	default mediaStatus;
